package com.yanqu.road.entity.activity.recallplayer.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.math.BigInteger;
import java.util.Date;

@FieldTypeAnnotation(tableName = "t_u_recall_player_bind_task")
public class RecallPlayerBindingTaskData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true, isIndex = true, desc = "userId")
    private long userId;
    @FieldTypeAnnotation(select = true, update = true, isIndex = true, desc = "回归绑定玩家id")
    private long bindUserId;
    @FieldTypeAnnotation(select = true, update = true, isIndex = true, desc = "任务id")
    private int taskId;
    @FieldTypeAnnotation(desc = "任务类型")
    private int taskType;
    @FieldTypeAnnotation(desc = "绑定时的值")
    private BigInteger oldValue = BigInteger.valueOf(-1L);
    @FieldTypeAnnotation(desc = "当前值")
    private BigInteger nowValue = BigInteger.ZERO;
    @FieldTypeAnnotation(desc = "是否领奖")
    private boolean gotRewarded;
    @FieldTypeAnnotation(desc = "最后更新时间")
    private long modifyTime;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public long getBindUserId() {
        return bindUserId;
    }

    public void setBindUserId(long bindUserId) {
        if (this.bindUserId != bindUserId) {
            this.bindUserId = bindUserId;
            setOp(DataStatus.Update);
        }
    }

    public int getTaskId() {
        return taskId;
    }

    public void setTaskId(int taskId) {
        if (this.taskId != taskId) {
            this.taskId = taskId;
            setOp(DataStatus.Update);
        }
    }

    public int getTaskType() {
        return taskType;
    }

    public void setTaskType(int taskType) {
        if (this.taskType != taskType) {
            this.taskType = taskType;
            setOp(DataStatus.Update);
        }
    }

    public BigInteger getOldValue() {
        return oldValue;
    }

    public void setOldValue(BigInteger oldValue) {
        if (oldValue == null) {
            return;
        }
        if (this.oldValue == null || !this.oldValue.equals(oldValue)) {
            this.oldValue = oldValue;
            setOp(DataStatus.Update);
        }
    }

    public BigInteger getNowValue() {
        return nowValue;
    }

    public void setNowValue(BigInteger nowValue) {
        if (nowValue == null) {
            return;
        }
        if (this.nowValue == null || !this.nowValue.equals(nowValue)) {
            this.nowValue = nowValue;
            setOp(DataStatus.Update);
        }
    }

    public boolean getGotRewarded() {
        return gotRewarded;
    }

    public void setGotRewarded(boolean gotRewarded) {
        if (this.gotRewarded != gotRewarded) {
            this.gotRewarded = gotRewarded;
            setOp(DataStatus.Update);
        }
    }

    public long getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(long modifyTime) {
        if (this.modifyTime != modifyTime) {
            this.modifyTime = modifyTime;
            setOp(DataStatus.Update);
        }
    }

}

